<?php

namespace Frieza\Modules\Totem\Actions;

use Encore\Admin\Actions\RowAction;
use Illuminate\Http\Request;

class UpdateTotem extends RowAction
{
    public $name = '编辑徽章';

    public function href()
    {
        return "/admin/totem/index/".$this->getKey()."/edit";
    }

    public function retrieveModel(Request $request)
    {
        if (!$key = $request->get('_key')) {
            return false;
        }

        return $key;
    }
}
